<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'No cold storage',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/01/04.jpg" alt="A packed main street" class="framed-centred-image" width="649" height="480"/>
<section id="dreams">
	<h2>Dream journal</h2>
	<p>
		I dreamed I was getting ready for a school choir performance.
		I was wearing fake nails, blue and glittery.
		The dress I planned to wear was red, so I went to get the dress and some red, glittery nail polish to match.
		I started taking off the fake nails carefully, and planned to paint my nails directly.
	</p>
	<p>
		I&apos;m not sure why I was wearing fake nails.
		Those things seem like a hazard.
		I&apos;ve never worn them myself, but I&apos;ve seen people get their real nails torn off when they get their fake nails bumped hard the wrong way.
		Besides, long nails seem impractical for getting things done.
		Of course, fake nails on the real world are bound on by stronger glue than in my dream.
		I wouldn&apos;t be able to simply peel them off carefully.
		I&apos;d no doubt need some sort of solvent, if I was able to get them off at all.
	</p>
</section>
<section id="freezer">
	<h2>Freezer space</h2>
	<p>
		My toxic former shift leader dropped by today, asking to use some of my freezer space.
		I guess they tried to ask before coming by, but I wasn&apos;t able to get my network connection working this morning, so I couldn&apos;t check my email.
		I guess I should have turned them down.
		I didn&apos;t think I&apos;d ever forgive them.
		But I guess at least on some level, I have.
		And they seem so desperate.
		My understanding is that they&apos;re homeless, living in a vehicle with their spouse and child.
		I recently learned that they don&apos;t rent an apartment because their spouse refuses to live in one - even temporarily while looking for another apartment - that has a shower, but no bath.
		I guess their spouse is kind of toxic, and the strain on their body and mind may have made them behave in ways they wouldn&apos;t have if in a better life situation.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			Our textbook indicates that logic programming <strong>*isn&apos;t*</strong> efficient (Ben-Ari, 2006).
			Furthermore, its description of how a computer solves problems written in a logic programming language makes it sound like nothing but brute force.
			I can therefore only conclude that this week&apos;s discussion question is a tick question, just like the question from another week on when recursion is an efficient solution.
			Recursion wastes computational resources, but for some cases, allows the developer an easier way to think about how to build a solution.
			Logic programming takes this even further.
			The computer resorts to brute force, but the programmer is able to think only about the details of the problem and not at all about how to find the solution.
			Development hours and debugging hours are therefore saved, but for things that will be run multiple times, the cost in computational resources won&apos;t likely be worth it.
		</p>
		<p>
			I can&apos;t seem to find anything on the web that disputes this.
			Some sites give examples of when logic programming might be the right tool for the job, but none of these claim it to be an <strong>*efficient*</strong> tool for the job, and this week&apos;s discussion is all about efficiency.
		</p>
		<p>
			Online sources seem to say logic programming is good for parsing, but personally, I think a brute force approach to parsing is a mistake.
			Typically, I write scripts, so parsing is the type of task I&apos;d need performed every time the script was run.
			Brute force would drag down the script&apos;s performance.
			When I compile other developers&apos; software from source, I find it already takes longer than I&apos;d like it to.
			If the code base wasn&apos;t large, it&apos;d probably be written as scripts instead, and a large code base requires a long compile time.
			Adding brute force for parsing the code would extend this compile time further.
		</p>
		<p>
			Instead, I think logic programming is better suited for one-off problems.
			If you&apos;re trying to solve a logic problem, that isn&apos;t too complex, and you only need it solved once, a logic programming language might be the right tool for you.
			If the problem <strong>*is*</strong> too complex though, you&apos;re not going to get a solution in a reasonable amount of time using brute force, so you&apos;re better off with an imperative language.
			You&apos;re also better off using an imperative language if you plan to run the program repeatedly, potentially with different outputs.
			The thing to keep in mind when deciding whether to use a logic programming language though is that logic programming is for brute force solutions, and is in no way efficient.
			Brute force is certainly the right tool for the job at times, but those times are few and far between.
			Being the right tool for the job doesn&apos;t make it an <strong>*efficient*</strong> tool for the job, though.
		</p>
		<p>
			If I were to use a logic programming language, I&apos;d probably use is for solving puzzles, similar to the one in which you need to figure out what person lives in what house, enjoys what drink, and has what colour of curtains.
			These problems have few enough combinations that brute force could be an ideal solution.
			It&apos;s not worth development time to try to figure out how to arrive at the solution the efficient way, so telling the computer to try every solution via logic programming would be idea.
			A sudoku, on the other hand, might be too complex for logic programming, as there are too many solutions to try, and trying them all would take a lot of computational resources.
			I can&apos;t figure out a single real-world case in which I&apos;d choose logic programming though.
			I tend to code brute force solutions when I don&apos;t know an efficient way to solve a problem, but come up with a much better way before the brute force solution is able to complete.
			Switching languages between my brute force solution and a better solution adds further development time, so isn&apos;t something I&apos;d want to do.
		</p>
		<div class="APA_references">
			<h3>References:</h3>
			<p>
				Ben-Ari, M. (2006). Understanding Programming Languages. Retrieved from <a href="https://my.uopeople.edu/pluginfile.php/356896/mod_page/content/30/understanding_programming_languages.pdf"><code>https://my.uopeople.edu/pluginfile.php/356896/mod_page/content/30/understanding_programming_languages.pdf</code></a>
			</p>
		</div>
	</blockquote>
</section>
<section id="plan">
	<h2>Plan</h2>
	<p>
		My main goal for the week is to get my coursework done as quickly as possible.
		It&apos;s of vital importance that I not lag behind this week.
		Then after my final exams, I need to begin my job hunt.
	</p>
	<p>
		Once I&apos;ve found a new job, I think my main focus will be permanent hair removal and vocal lessons.
		I need to find local businesses offering these services, and get these things done.
		Both are time-consuming, so I should get started as soon as feasible.
		And on the back burner, I still have this gut flab to get rid of.
		I don&apos;t think I can get rid of it without a place to do sit-ups though, and I won&apos;t have space in my home for that until my mother clears her stuff out, which could be quite a while.
	</p>
</section>
<section id="eyeglasses">
	<h2>Eyeglasses</h2>
	<p>
		With how wonky the eyeglasses make my vision once I take them off, it&apos;s been hard to see for sure how much they help my vision.
		I can&apos;t just take them off and compare to how my vision is when they&apos;re on.
		I&apos;ve left them off for over a week now though, and I think my vision&apos;s worse than I&apos;d realised.
		Now that I have the glasses, I&apos;m paying more attention to try to see if they&apos;re helping, so I&apos;m noticing just how bad my vision really is.
		I think they might actually help more than they hurt.
		I&apos;m probably going to start wearing them fairly regularly when I&apos;m out now, or at least wear them more often.
	</p>
</section>
END
);
